package com.example.aopdemo;

import com.example.aopdemo.service.OrderService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppTest {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContext.xml");

        OrderService orderService = context.getBean(OrderService.class);

        orderService.add("iPhone", 2);
        orderService.delete("iPhone");
        orderService.find("iPhone");
    }
}
